﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Publisher.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Defines the Publisher type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Assets
{
    using System;
    using System.ComponentModel;

    public class Publisher : INotifyPropertyChanged
    {
        public event EventHandler<EventArgs> GenericNotification;

        public event EventHandler NonGenericNotification;

        public void RaiseNotification(EventArgs e)
        {
            if (GenericNotification != null)
            {
                GenericNotification(this, e);
            }

            if (NonGenericNotification != null)
            {
                NonGenericNotification(this, e);
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public void RaisePropertyChanged(PropertyChangedEventArgs args)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, args);
            }
        }
    }
}